package tree;

import java.util.List;

/**
 * @author sheng.dong
 */
public class Node implements BaseTreeNode<Node, Integer> {

    private Integer id;
    private Integer pid;
    private String tag;
    private List<Node> subNodes;

    public Node(Integer id, Integer pid, String tag) {
        this.id = id;
        this.pid = pid;
        this.tag = tag;
    }


    @Override
    public Integer rootPidValue() {
        return 0;
    }

    @Override
    public Integer getId() {
        return id;
    }

    @Override
    public void setId(Integer integer) {
        this.id = id;
    }

    @Override
    public Integer getPid() {
        return pid;
    }

    @Override
    public void setPid(Integer pid) {
        this.pid = pid;
    }

    @Override
    public String getTag() {
        return tag;
    }

    @Override
    public void setTag(String tag) {
        this.tag = tag;
    }

    @Override
    public List<Node> getSubNodes() {
        return subNodes;
    }

    @Override
    public void setSubNodes(List<Node> subNodes) {
        this.subNodes = subNodes;
    }
}
